package tech.daoxuan.web.async;

import org.springframework.stereotype.Component;
import org.springframework.web.context.request.async.DeferredResult;

import java.util.HashMap;
import java.util.Map;

@Component
public class DeferredResultHolder {
    /**
     * key 可以理解为订单号
     *  v  每个订单的处理结果
     * @return
     */
    public Map<String, DeferredResult<String>> getMap() {
        return map;
    }

    public void setMap(Map<String, DeferredResult<String>> map) {
        this.map = map;
    }

    private Map<String, DeferredResult<String>> map= new HashMap<>();
}
